1 package net.sf.mmapps.applications.developer;
2
3 import java.awt.*;
4
5 import javax.swing.*;
6 import javax.swing.border.EtchedBorder;
7
8 /***
9 *
10 * @author Kees Jongenburger
11 * @version $Id: StatusBar.java,v 1.1.1.1 2004/02/06 08:44:07 keesj Exp $
12 */
13 public class StatusBar extends JPanel{
14 private JLabel message ;
15 private JProgressBar jProgressBar;
16
17 /*** Creates a new instance of StatusBar */
18 public StatusBar() {
19
20 message = new JLabel();
21 jProgressBar = new JProgressBar();
22 jProgressBar.setMinimum(0);
23 jProgressBar.setMaximum(100);
24 jProgressBar.setMinimumSize(new Dimension(100, 20));
25 jProgressBar.setSize(new Dimension(100, 20));
26
27 message.setMinimumSize(new Dimension(300, 20));
28 message.setSize(new Dimension(300, 20));
29 message.setFont(new Font("Arial", Font.PLAIN, 10));
30 message.setForeground(Color.black);
31
32 setLayout(new BorderLayout());
33 setBorder(new EtchedBorder(EtchedBorder.LOWERED));
34 add(message, BorderLayout.CENTER);
35 add(jProgressBar, BorderLayout.EAST);
36
37 }
38
39 public void setValue(int procent){
40 jProgressBar.setValue(procent);
41 }
42
43 public int getValue(){
44 return jProgressBar.getValue();
45 }
46 public void showStatus(String message){
47 this.message.setText(message);
48 paintImmediately(getBounds());
49 }
50
51 }